load("//bazel:skia_rules.bzl", "exports_files_legacy", "skia_cc_library", "skia_filegroup", "split_srcs_and_hdrs")

licenses(["notice"])

exports_files_legacy()

# In separate file list because these files are exported to
# core.gni:skia_core_sources as well as sksl.gni:skslc_deps.
CORE_SKSLC_FILES = [
    "SkChecksum.cpp",
    "SkChecksum.h",
    "SkCpu.cpp",
    "SkCpu.h",
    "SkData.cpp",
    "SkMatrixInvert.cpp",
    "SkMatrixInvert.h",
    "SkStream.cpp",
    "SkString.cpp",
    "SkStringUtils.cpp",
    "SkStringUtils.h",
]

split_srcs_and_hdrs(
    name = "core_skslc",
    files = CORE_SKSLC_FILES,
)

CORE_FILES = [
    "Sk4px.h",
    "SkAAClip.cpp",
    "SkAAClip.h",
    "SkATrace.cpp",
    "SkATrace.h",
    "SkAdvancedTypefaceMetrics.h",
    "SkAlphaRuns.cpp",
    "SkAlphaRuns.h",
    "SkAnalyticEdge.cpp",
    "SkAnalyticEdge.h",
    "SkAnnotation.cpp",
    "SkAnnotationKeys.h",
    "SkAutoBlitterChoose.h",
    "SkAutoPixmapStorage.cpp",
    "SkAutoPixmapStorage.h",
    "SkBBHFactory.cpp",
    "SkBigPicture.cpp",
    "SkBigPicture.h",
    "SkBitmap.cpp",
    "SkBitmapCache.cpp",
    "SkBitmapCache.h",
    "SkBitmapDevice.cpp",
    "SkBitmapDevice.h",
    "SkBitmapProcState.cpp",
    "SkBitmapProcState.h",
    "SkBitmapProcState_matrixProcs.cpp",
    "SkBitmapProcState_opts.cpp",
    "SkBitmapProcState_opts_ssse3.cpp",
    "SkBlendMode.cpp",
    "SkBlendModeBlender.cpp",
    "SkBlendModeBlender.h",
    "SkBlendModePriv.h",
    "SkBlenderBase.h",
    "SkBlitBWMaskTemplate.h",  # TODO(kjlubick) should this be a textual header?
    "SkBlitMask.h",
    "SkBlitMask_opts.cpp",
    "SkBlitMask_opts_ssse3.cpp",
    "SkBlitRow.h",
    "SkBlitRow_D32.cpp",
    "SkBlitRow_opts.cpp",
    "SkBlitRow_opts_hsw.cpp",
    "SkBlitter.cpp",
    "SkBlitter.h",
    "SkBlitter_A8.cpp",
    "SkBlitter_A8.h",
    "SkBlitter_ARGB32.cpp",
    "SkBlitter_Sprite.cpp",
    "SkBlurEngine.h",
    "SkBlurMask.cpp",
    "SkBlurMask.h",
    "SkBlurMaskFilterImpl.cpp",
    "SkBlurMaskFilterImpl.h",
    "SkCachedData.cpp",
    "SkCachedData.h",
    "SkCanvas.cpp",
    "SkCanvasPriv.cpp",
    "SkCanvasPriv.h",
    "SkCanvas_Raster.cpp",
    "SkCapabilities.cpp",
    "SkClipStack.cpp",
    "SkClipStack.h",
    "SkClipStackDevice.cpp",
    "SkClipStackDevice.h",
    "SkColor.cpp",
    "SkColorFilter.cpp",
    "SkColorFilterPriv.h",
    "SkColorSpace.cpp",
    "SkColorSpacePriv.h",
    "SkColorSpaceXformSteps.cpp",
    "SkColorSpaceXformSteps.h",
    "SkColorTable.cpp",
    "SkCompressedDataUtils.cpp",
    "SkCompressedDataUtils.h",
    "SkContourMeasure.cpp",
    "SkConvertPixels.cpp",
    "SkConvertPixels.h",
    "SkCoreBlitters.h",
    "SkCubicClipper.cpp",
    "SkCubicClipper.h",
    "SkCubicMap.cpp",
    "SkDataTable.cpp",
    "SkDebugUtils.h",
    "SkDescriptor.cpp",
    "SkDescriptor.h",
    "SkDevice.cpp",
    "SkDevice.h",
    "SkDistanceFieldGen.cpp",
    "SkDistanceFieldGen.h",
    "SkDocument.cpp",
    "SkDraw.cpp",
    "SkDraw.h",
    "SkDrawBase.cpp",
    "SkDrawBase.h",
    "SkDrawProcs.h",
    "SkDrawShadowInfo.cpp",
    "SkDrawShadowInfo.h",
    "SkDraw_atlas.cpp",
    "SkDraw_text.cpp",
    "SkDraw_vertices.cpp",
    "SkDrawable.cpp",
    "SkEdge.cpp",
    "SkEdge.h",
    "SkEdgeBuilder.cpp",
    "SkEdgeBuilder.h",
    "SkEdgeClipper.cpp",
    "SkEdgeClipper.h",
    "SkEffectPriv.h",
    "SkEnumerate.h",
    "SkExecutor.cpp",
    "SkFDot6.h",
    "SkFlattenable.cpp",
    "SkFont.cpp",
    "SkFontDescriptor.cpp",
    "SkFontDescriptor.h",
    "SkFontMetricsPriv.cpp",
    "SkFontMetricsPriv.h",
    "SkFontMgr.cpp",
    "SkFontPriv.h",
    "SkFontScanner.h",
    "SkFontStream.cpp",
    "SkFontStream.h",
    "SkFont_serial.cpp",
    "SkGaussFilter.cpp",
    "SkGaussFilter.h",
    "SkGeometry.cpp",
    "SkGeometry.h",
    "SkGlobalInitialization_core.cpp",
    "SkGlyph.cpp",
    "SkGlyph.h",
    "SkGlyphRunPainter.cpp",
    "SkGlyphRunPainter.h",
    "SkGraphics.cpp",
    "SkIDChangeListener.cpp",
    "SkIPoint16.h",
    "SkImageFilter.cpp",
    "SkImageFilterCache.cpp",
    "SkImageFilterCache.h",
    "SkImageFilterTypes.cpp",
    "SkImageFilterTypes.h",
    "SkImageFilter_Base.h",
    "SkImageGenerator.cpp",
    "SkImageInfo.cpp",
    "SkImageInfoPriv.h",
    "SkImagePriv.h",
    "SkKnownRuntimeEffects.cpp",
    "SkKnownRuntimeEffects.h",
    "SkLRUCache.h",
    "SkLatticeIter.cpp",
    "SkLatticeIter.h",
    "SkLineClipper.cpp",
    "SkLineClipper.h",
    "SkLocalMatrixImageFilter.cpp",
    "SkLocalMatrixImageFilter.h",
    "SkM44.cpp",
    "SkMD5.cpp",
    "SkMD5.h",
    "SkMallocPixelRef.cpp",
    "SkMask.cpp",
    "SkMask.h",
    "SkMaskBlurFilter.cpp",
    "SkMaskBlurFilter.h",
    "SkMaskCache.cpp",
    "SkMaskCache.h",
    "SkMaskFilter.cpp",
    "SkMaskFilterBase.h",
    "SkMaskGamma.cpp",
    "SkMaskGamma.h",
    "SkMasks.cpp",
    "SkMasks.h",
    "SkMatrix.cpp",
    "SkMatrixPriv.h",
    "SkMatrixUtils.h",
    "SkMemset.h",
    "SkMemset_opts.cpp",
    "SkMemset_opts_avx.cpp",
    "SkMemset_opts_erms.cpp",
    "SkMesh.cpp",
    "SkMeshPriv.h",
    "SkMessageBus.h",
    "SkMipmap.cpp",
    "SkMipmap.h",
    "SkMipmapAccessor.cpp",
    "SkMipmapAccessor.h",
    "SkMipmapBuilder.cpp",
    "SkMipmapBuilder.h",
    "SkMipmapDrawDownSampler.cpp",
    "SkMipmapHQDownSampler.cpp",
    "SkNextID.h",
    "SkOSFile.h",
    "SkOpts.cpp",
    "SkOpts.h",
    "SkOptsTargets.h",
    "SkOverdrawCanvas.cpp",
    "SkPaint.cpp",
    "SkPaintDefaults.h",
    "SkPaintPriv.cpp",
    "SkPaintPriv.h",
    "SkPath.cpp",
    "SkPathBuilder.cpp",
    "SkPathEffect.cpp",
    "SkPathEffectBase.h",
    "SkPathEnums.h",
    "SkPathMakers.h",
    "SkPathMeasure.cpp",
    "SkPathMeasurePriv.h",
    "SkPathPriv.h",
    "SkPathRef.cpp",
    "SkPathUtils.cpp",
    "SkPath_serial.cpp",
    "SkPicture.cpp",
    "SkPictureData.cpp",
    "SkPictureData.h",
    "SkPictureFlat.cpp",
    "SkPictureFlat.h",
    "SkPicturePlayback.cpp",
    "SkPicturePlayback.h",
    "SkPicturePriv.h",
    "SkPictureRecord.cpp",
    "SkPictureRecord.h",
    "SkPictureRecorder.cpp",
    "SkPixelRef.cpp",
    "SkPixelRefPriv.h",
    "SkPixmap.cpp",
    "SkPixmapDraw.cpp",
    "SkPoint.cpp",
    "SkPoint3.cpp",
    "SkPointPriv.h",
    "SkPtrRecorder.cpp",
    "SkPtrRecorder.h",
    "SkQuadClipper.cpp",
    "SkQuadClipper.h",
    "SkRRect.cpp",
    "SkRRectPriv.h",
    "SkRSXform.cpp",
    "SkRTree.cpp",
    "SkRTree.h",
    "SkRasterClip.cpp",
    "SkRasterClip.h",
    "SkRasterClipStack.h",
    "SkRasterPipeline.cpp",
    "SkRasterPipeline.h",
    "SkRasterPipelineBlitter.cpp",
    "SkRasterPipelineContextUtils.h",
    "SkRasterPipelineOpContexts.h",
    "SkRasterPipelineOpList.h",
    "SkReadBuffer.cpp",
    "SkReadBuffer.h",
    "SkReadPixelsRec.cpp",
    "SkReadPixelsRec.h",
    "SkRecord.cpp",
    "SkRecord.h",
    "SkRecordDraw.cpp",
    "SkRecordDraw.h",
    "SkRecordOpts.cpp",
    "SkRecordOpts.h",
    "SkRecordPattern.h",
    "SkRecordedDrawable.cpp",
    "SkRecordedDrawable.h",
    "SkRecorder.cpp",
    "SkRecorder.h",
    "SkRecords.cpp",
    "SkRecords.h",
    "SkRect.cpp",
    "SkRectPriv.h",
    "SkRegion.cpp",
    "SkRegionPriv.h",
    "SkRegion_path.cpp",
    "SkResourceCache.cpp",
    "SkResourceCache.h",
    "SkRuntimeBlender.cpp",
    "SkRuntimeBlender.h",
    "SkRuntimeEffect.cpp",
    "SkRuntimeEffectPriv.h",
    "SkSLTypeShared.cpp",
    "SkSLTypeShared.h",
    "SkSafeRange.h",
    "SkSamplingPriv.h",
    "SkScalar.cpp",
    "SkScaleToSides.h",
    "SkScalerContext.cpp",
    "SkScalerContext.h",
    "SkScan.cpp",
    "SkScan.h",
    "SkScanPriv.h",
    "SkScan_AAAPath.cpp",
    "SkScan_AntiPath.cpp",
    "SkScan_Antihair.cpp",
    "SkScan_Hairline.cpp",
    "SkScan_Path.cpp",
    "SkSpecialImage.cpp",
    "SkSpecialImage.h",
    "SkSpriteBlitter.h",
    "SkSpriteBlitter_ARGB32.cpp",
    "SkStreamPriv.h",
    "SkStrike.cpp",
    "SkStrike.h",
    "SkStrikeCache.cpp",
    "SkStrikeCache.h",
    "SkStrikeSpec.cpp",
    "SkStrikeSpec.h",
    "SkStroke.cpp",
    "SkStroke.h",
    "SkStrokeRec.cpp",
    "SkStrokerPriv.cpp",
    "SkStrokerPriv.h",
    "SkSurfacePriv.h",
    "SkSwizzle.cpp",
    "SkSwizzlePriv.h",
    "SkSwizzler_opts.cpp",
    "SkSwizzler_opts_hsw.cpp",
    "SkSwizzler_opts_ssse3.cpp",
    "SkTDynamicHash.h",
    "SkTHash.h",
    "SkTMultiMap.h",
    "SkTaskGroup.cpp",
    "SkTaskGroup.h",
    "SkTextBlob.cpp",
    "SkTextBlobPriv.h",
    "SkTextFormatParams.h",
    "SkTraceEvent.h",
    "SkTraceEventCommon.h",
    "SkTypeface.cpp",
    "SkTypefaceCache.cpp",
    "SkTypefaceCache.h",
    "SkTypeface_remote.cpp",
    "SkTypeface_remote.h",
    "SkUnPreMultiply.cpp",
    "SkValidationUtils.h",
    "SkVertState.cpp",
    "SkVertState.h",
    "SkVertices.cpp",
    "SkVerticesPriv.h",
    "SkWriteBuffer.cpp",
    "SkWriteBuffer.h",
    "SkWritePixelsRec.cpp",
    "SkWritePixelsRec.h",
    "SkWriter32.cpp",
    "SkWriter32.h",
    "SkYUVAInfo.cpp",
    "SkYUVAInfoLocation.h",
    "SkYUVAPixmaps.cpp",
    "SkYUVMath.cpp",
    "SkYUVMath.h",
    "SkYUVPlanesCache.cpp",
    "SkYUVPlanesCache.h",
]

split_srcs_and_hdrs(
    name = "legacy_core",
    files = CORE_FILES,
)

skia_filegroup(
    name = "legacy_draw_looper",
    srcs = [
        "SkDrawLooper.cpp",
    ],
)

skia_filegroup(
    name = "srcs",
    srcs = [
        ":core_skslc_srcs",
        ":legacy_core_srcs",
    ],
    visibility = ["//src:__pkg__"],
)

skia_filegroup(
    name = "private_hdrs",
    srcs = [
        ":core_skslc_hdrs",
        ":legacy_core_hdrs",
    ],
    visibility = ["//src:__pkg__"],
)

skia_filegroup(
    name = "core_priv_hdrs",
    srcs = [
        # By putting headers here, we are explicitly stating we want to use them
        # in places other than core. They still count as "private" headers.
        "Sk4px.h",
        "SkAAClip.h",
        "SkATrace.h",
        "SkAdvancedTypefaceMetrics.h",
        "SkAnnotationKeys.h",
        "SkAutoPixmapStorage.h",
        "SkBitmapCache.h",
        "SkBitmapDevice.h",
        "SkBitmapProcState.h",
        "SkBlendModeBlender.h",
        "SkBlendModePriv.h",
        "SkBlenderBase.h",
        "SkBlitter_A8.h",
        "SkBlurEngine.h",
        "SkBlurMask.h",
        "SkBlurMaskFilterImpl.h",
        "SkCachedData.h",
        "SkCanvasPriv.h",
        "SkChecksum.h",
        "SkClipStack.h",
        "SkClipStackDevice.h",
        "SkColorFilterPriv.h",
        "SkColorSpacePriv.h",
        "SkColorSpaceXformSteps.h",
        "SkCompressedDataUtils.h",
        "SkConvertPixels.h",
        "SkCpu.h",
        "SkDebugUtils.h",
        "SkDescriptor.h",
        "SkDevice.h",
        "SkDistanceFieldGen.h",
        "SkDraw.h",
        "SkDrawBase.h",
        "SkDrawProcs.h",
        "SkDrawShadowInfo.h",
        "SkEdgeClipper.h",
        "SkEffectPriv.h",
        "SkEnumerate.h",
        "SkFDot6.h",
        "SkFontDescriptor.h",
        "SkFontMetricsPriv.h",
        "SkFontPriv.h",
        "SkFontScanner.h",
        "SkFontStream.h",
        "SkGeometry.h",
        "SkGlyph.h",
        "SkIPoint16.h",
        "SkImageFilterCache.h",
        "SkImageFilterTypes.h",
        "SkImageFilter_Base.h",
        "SkImageInfoPriv.h",
        "SkImagePriv.h",
        "SkLRUCache.h",
        "SkLatticeIter.h",
        "SkLocalMatrixImageFilter.h",
        "SkMD5.h",
        "SkMask.h",
        "SkMasks.h",
        "SkMaskFilterBase.h",
        "SkMaskGamma.h",
        "SkMatrixInvert.h",
        "SkMatrixPriv.h",
        "SkMatrixUtils.h",
        "SkMemset.h",
        "SkMeshPriv.h",
        "SkMessageBus.h",
        "SkMipmap.h",
        "SkMipmapAccessor.h",
        "SkNextID.h",
        "SkOSFile.h",
        "SkOpts.h",
        "SkPaintDefaults.h",
        "SkPaintPriv.h",
        "SkPathEffectBase.h",
        "SkPathEnums.h",
        "SkPathPriv.h",
        "SkPictureData.h",
        "SkPicturePriv.h",
        "SkPointPriv.h",
        "SkRRectPriv.h",
        "SkRTree.h",
        "SkRasterClip.h",
        "SkRasterPipeline.h",
        "SkRasterPipelineContextUtils.h",
        "SkRasterPipelineOpContexts.h",
        "SkRasterPipelineOpList.h",
        "SkReadBuffer.h",
        "SkRecord.h",
        "SkRecordDraw.h",
        "SkRecordOpts.h",
        "SkRecordedDrawable.h",
        "SkRecorder.h",
        "SkRectPriv.h",
        "SkRegionPriv.h",
        "SkResourceCache.h",
        "SkRuntimeBlender.h",
        "SkRuntimeEffectPriv.h",
        "SkSLTypeShared.h",
        "SkSamplingPriv.h",
        "SkScalerContext.h",
        "SkScan.h",
        "SkSpecialImage.h",
        "SkStreamPriv.h",
        "SkStrike.h",
        "SkStrikeCache.h",
        "SkStrikeSpec.h",
        "SkStringUtils.h",
        "SkStroke.h",
        "SkSurfacePriv.h",
        "SkSwizzlePriv.h",
        "SkTDynamicHash.h",
        "SkTHash.h",
        "SkTMultiMap.h",
        "SkTaskGroup.h",
        "SkTextBlobPriv.h",
        "SkTextFormatParams.h",
        "SkTraceEvent.h",
        "SkTraceEventCommon.h",
        "SkTypefaceCache.h",
        "SkTypeface_remote.h",
        "SkValidationUtils.h",
        "SkVertState.h",
        "SkVerticesPriv.h",
        "SkWriteBuffer.h",
        "SkWriter32.h",
        "SkYUVAInfoLocation.h",
        "SkYUVMath.h",
        "SkYUVPlanesCache.h",
        "//include/private/chromium:core_hdrs",
        "//include/private:core_priv_hdrs",
        "//src/effects:core_priv_hdrs",
        "//src/image:core_priv_hdrs",
        "//src/sfnt:core_priv_hdrs",
        "//src/shaders:core_priv_hdrs",
        "//src/sksl/codegen:rasterpipeline_hdrs",
        "//src/sksl:core_priv_hdrs",
        "//src/text:core_priv_hdrs",
        "//src/utils:core_priv_hdrs",
    ],
)

skia_filegroup(
    name = "opts_srcs",
    srcs = [
        "Sk4px.h",
        "SkOpts.h",
        "SkOptsTargets.h",
        "SkRasterPipeline.h",
        "SkRasterPipelineContextUtils.h",
        "SkRasterPipelineOpContexts.h",
        "SkRasterPipelineOpList.h",
    ],
    visibility = ["//src/opts:__pkg__"],
)

skia_filegroup(
    name = "core_priv_srcs",
    srcs = [
        # Private Headers (not used in other modules [except tests/gms])
        "SkAlphaRuns.h",
        "SkAnalyticEdge.h",
        "SkAutoBlitterChoose.h",
        "SkBigPicture.h",
        "SkBlitMask.h",
        "SkBlitRow.h",
        "SkBlitter.h",
        "SkCoreBlitters.h",
        "SkCubicClipper.h",
        "SkEdge.h",
        "SkEdgeBuilder.h",
        "SkGaussFilter.h",
        "SkGlyphRunPainter.h",
        "SkKnownRuntimeEffects.h",
        "SkLineClipper.h",
        "SkMaskBlurFilter.h",
        "SkMaskCache.h",
        "SkMipmapBuilder.h",
        "SkOptsTargets.h",
        "SkPathMakers.h",
        "SkPathMeasurePriv.h",
        "SkPictureFlat.h",
        "SkPicturePlayback.h",
        "SkPictureRecord.h",
        "SkPixelRefPriv.h",
        "SkPtrRecorder.h",
        "SkQuadClipper.h",
        "SkRasterClipStack.h",
        "SkReadPixelsRec.h",
        "SkRecordPattern.h",
        "SkRecords.h",
        "SkSafeRange.h",
        "SkScaleToSides.h",
        "SkScanPriv.h",
        "SkSpriteBlitter.h",
        "SkStrokerPriv.h",
        "SkWritePixelsRec.h",
        "//include/private:core_srcs",
    ],
)

skia_filegroup(
    name = "core_srcs",
    srcs = [
        # Implementation of public and private headers
        "SkAAClip.cpp",
        "SkATrace.cpp",
        "SkAlphaRuns.cpp",
        "SkAnalyticEdge.cpp",
        "SkAnnotation.cpp",
        "SkAutoPixmapStorage.cpp",
        "SkBBHFactory.cpp",
        "SkBigPicture.cpp",
        "SkBitmap.cpp",
        "SkBitmapCache.cpp",
        "SkBitmapDevice.cpp",
        "SkBitmapProcState.cpp",
        "SkBitmapProcState_matrixProcs.cpp",
        "SkBitmapProcState_opts.cpp",
        "SkBitmapProcState_opts_ssse3.cpp",
        "SkBlendMode.cpp",
        "SkBlendModeBlender.cpp",
        "SkBlitMask_opts.cpp",
        "SkBlitMask_opts_ssse3.cpp",
        "SkBlitRow_D32.cpp",
        "SkBlitRow_opts.cpp",
        "SkBlitRow_opts_hsw.cpp",
        "SkBlitter.cpp",
        "SkBlitter_A8.cpp",
        "SkBlitter_ARGB32.cpp",
        "SkBlitter_Sprite.cpp",
        "SkBlurMask.cpp",
        "SkBlurMaskFilterImpl.cpp",
        "SkCachedData.cpp",
        "SkCanvas.cpp",
        "SkCanvasPriv.cpp",
        "SkCanvas_Raster.cpp",
        "SkCapabilities.cpp",
        "SkChecksum.cpp",
        "SkClipStack.cpp",
        "SkClipStackDevice.cpp",
        "SkColor.cpp",
        "SkColorFilter.cpp",
        "SkColorSpace.cpp",
        "SkColorSpaceXformSteps.cpp",
        "SkColorTable.cpp",
        "SkCompressedDataUtils.cpp",
        "SkContourMeasure.cpp",
        "SkConvertPixels.cpp",
        "SkCpu.cpp",
        "SkCubicClipper.cpp",
        "SkCubicMap.cpp",
        "SkData.cpp",
        "SkDataTable.cpp",
        "SkDescriptor.cpp",
        "SkDevice.cpp",
        "SkDistanceFieldGen.cpp",
        "SkDocument.cpp",
        "SkDraw.cpp",
        "SkDrawBase.cpp",
        "SkDrawShadowInfo.cpp",
        "SkDraw_atlas.cpp",
        "SkDraw_text.cpp",
        "SkDraw_vertices.cpp",
        "SkDrawable.cpp",
        "SkEdge.cpp",
        "SkEdgeBuilder.cpp",
        "SkEdgeClipper.cpp",
        "SkExecutor.cpp",
        "SkFlattenable.cpp",
        "SkFont.cpp",
        "SkFontDescriptor.cpp",
        "SkFontMetricsPriv.cpp",
        "SkFontMgr.cpp",
        "SkFontStream.cpp",
        "SkFont_serial.cpp",
        "SkGaussFilter.cpp",
        "SkGeometry.cpp",
        "SkGlobalInitialization_core.cpp",
        "SkGlyph.cpp",
        "SkGlyphRunPainter.cpp",
        "SkGraphics.cpp",
        "SkIDChangeListener.cpp",
        "SkImageFilter.cpp",
        "SkImageFilterCache.cpp",
        "SkImageFilterTypes.cpp",
        "SkImageGenerator.cpp",
        "SkImageInfo.cpp",
        "SkKnownRuntimeEffects.cpp",
        "SkLatticeIter.cpp",
        "SkLineClipper.cpp",
        "SkLocalMatrixImageFilter.cpp",
        "SkM44.cpp",
        "SkMD5.cpp",
        "SkMallocPixelRef.cpp",
        "SkMask.cpp",
        "SkMasks.cpp",
        "SkMaskBlurFilter.cpp",
        "SkMaskCache.cpp",
        "SkMaskFilter.cpp",
        "SkMaskGamma.cpp",
        "SkMatrix.cpp",
        "SkMatrixInvert.cpp",
        "SkMemset_opts.cpp",
        "SkMemset_opts_avx.cpp",
        "SkMemset_opts_erms.cpp",
        "SkMesh.cpp",
        "SkMipmap.cpp",
        "SkMipmapAccessor.cpp",
        "SkMipmapBuilder.cpp",
        "SkMipmapDrawDownSampler.cpp",
        "SkMipmapHQDownSampler.cpp",
        "SkOpts.cpp",
        "SkOverdrawCanvas.cpp",
        "SkPaint.cpp",
        "SkPaintPriv.cpp",
        "SkPath.cpp",
        "SkPathBuilder.cpp",
        "SkPathEffect.cpp",
        "SkPathMeasure.cpp",
        "SkPathRef.cpp",
        "SkPathUtils.cpp",
        "SkPath_serial.cpp",
        "SkPicture.cpp",
        "SkPictureData.cpp",
        "SkPictureFlat.cpp",
        "SkPicturePlayback.cpp",
        "SkPictureRecord.cpp",
        "SkPictureRecorder.cpp",
        "SkPixelRef.cpp",
        "SkPixmap.cpp",
        "SkPixmapDraw.cpp",
        "SkPoint.cpp",
        "SkPoint3.cpp",
        "SkPtrRecorder.cpp",
        "SkQuadClipper.cpp",
        "SkRRect.cpp",
        "SkRSXform.cpp",
        "SkRTree.cpp",
        "SkRasterClip.cpp",
        "SkRasterPipeline.cpp",
        "SkRasterPipelineBlitter.cpp",
        "SkReadBuffer.cpp",
        "SkReadPixelsRec.cpp",
        "SkRecord.cpp",
        "SkRecordDraw.cpp",
        "SkRecordOpts.cpp",
        "SkRecordedDrawable.cpp",
        "SkRecorder.cpp",
        "SkRecords.cpp",
        "SkRect.cpp",
        "SkRegion.cpp",
        "SkRegion_path.cpp",
        "SkResourceCache.cpp",
        "SkRuntimeBlender.cpp",
        "SkRuntimeEffect.cpp",
        "SkSLTypeShared.cpp",
        "SkScalar.cpp",
        "SkScalerContext.cpp",
        "SkScan.cpp",
        "SkScan_AAAPath.cpp",
        "SkScan_AntiPath.cpp",
        "SkScan_Antihair.cpp",
        "SkScan_Hairline.cpp",
        "SkScan_Path.cpp",
        "SkSpecialImage.cpp",
        "SkSpriteBlitter_ARGB32.cpp",
        "SkStream.cpp",
        "SkStrike.cpp",
        "SkStrikeCache.cpp",
        "SkStrikeSpec.cpp",
        "SkString.cpp",
        "SkStringUtils.cpp",
        "SkStroke.cpp",
        "SkStrokeRec.cpp",
        "SkStrokerPriv.cpp",
        "SkSwizzle.cpp",
        "SkSwizzler_opts.cpp",
        "SkSwizzler_opts_hsw.cpp",
        "SkSwizzler_opts_ssse3.cpp",
        "SkTaskGroup.cpp",
        "SkTextBlob.cpp",
        "SkTypeface.cpp",
        "SkTypefaceCache.cpp",
        "SkTypeface_remote.cpp",
        "SkUnPreMultiply.cpp",
        "SkVertState.cpp",
        "SkVertices.cpp",
        "SkWriteBuffer.cpp",
        "SkWritePixelsRec.cpp",
        "SkWriter32.cpp",
        "SkYUVAInfo.cpp",
        "SkYUVAPixmaps.cpp",
        "SkYUVMath.cpp",
        "SkYUVPlanesCache.cpp",
    ],
)

skia_filegroup(
    name = "textual_hdrs",
    srcs = ["SkBlitBWMaskTemplate.h"],
)

skia_cc_library(
    name = "core",
    srcs = [
        ":core_priv_hdrs",
        ":core_priv_srcs",
        ":core_srcs",
        "//src/effects:core_srcs",
        "//src/image:core_srcs",
        "//src/ports:core_srcs",
        "//src/sfnt:core_srcs",
        "//src/shaders:core_srcs",
        "//src/sksl:core_srcs",
        "//src/sksl/codegen:rasterpipeline_srcs",
        "//src/text:core_srcs",
        "//src/utils:core_srcs",
    ],
    hdrs = [
        "//include/codec:core_hdrs",
        "//include/core:core_hdrs",
        "//include/effects:core_hdrs",
        "//include/ports:core_hdrs",
        "//include/sksl:core_hdrs",
        "//include/utils:core_hdrs",
    ],
    features = ["layering_check"],
    local_defines = [
        "SK_DISABLE_LEGACY_PNG_WRITEBUFFER",
        "SK_DISABLE_LEGACY_IMAGE_READBUFFER",
    ],
    textual_hdrs = [
        "//src/opts:textual_hdrs",
        ":textual_hdrs",
    ],
    visibility = [
        "//:__pkg__",
        "//src:__subpackages__",
    ],
    deps = [
        "//modules/skcms",
        "//src/base",
        "//src/opts",
        "//src/sksl:generated_sksl",
    ],
)

skia_cc_library(
    name = "core_priv",
    srcs = [":core_priv_srcs"],
    hdrs = [":core_priv_hdrs"],
    features = ["layering_check"],
    visibility = [
        "//bench:__subpackages__",
        "//gm:__subpackages__",
        "//modules:__subpackages__",
        "//src:__subpackages__",
        "//tools:__subpackages__",
    ],
    deps = [
        ":core",
        "//modules/skcms",
        "//src/base",
    ],
)
